//
//  SaveInterviewScheduleAPIManger.m
//  FindJob
//
//  Created by apple on 16/3/15.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "SaveInterviewScheduleAPIManger.h"
#import "NetWorkingConfig.h"
@implementation SaveInterviewScheduleAPIManger
- (void)startSaveInterViewScheduleRequestWithParameters:(NSDictionary *)parameter responds:(void (^)(RespondsStatus, NSString *))respondsBlock{
    [self startRequestURL:kInterviewScheduleURL parameters:parameter success:^(id responds) {
        NSInteger resultCode = [responds[@"resultCode"] integerValue];
        NSString *resultDesc = responds[@"resultDesc"];
        
        if (resultCode == 0) {
            if (respondsBlock) {
                respondsBlock(RespondsStatusSuccess,resultDesc);
            }else{
                if (respondsBlock) {
                    respondsBlock(RespondsStatusDataError,resultDesc);
                }
            }
        }
    } failure:^(NSError *error) {
        if (respondsBlock) {
            respondsBlock(RespondsStatusNotworkingError,@"网络错误");
        }
    } timeout:30.f];
}
@end
